<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class InsertDataToGoodsCategories extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('goods_categories', function (Blueprint $table) {
            $categories = [
                [
                  "name"=>"书法|字画",
                ],
                [
                    "name"=>"瓷器|紫砂",
                ],
            ];
            DB::table("goods_categories")->insert($categories);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('goods_categories', function (Blueprint $table) {
            DB::table("goods_categories")->truncate();
        });
    }
}
